package leetcode;
import java.util.*;
public class Slution {
    public int secondHighSet(String s){

        Set<Integer> set = new HashSet();
        for (char c : s.toCharArray()){
            if (Character.isDigit(c)){
                int c1 = c - '0';
                set.add(c1);
            }

        }
        if (set.size()<=1) {
            System.out.println("错误");
        }
        //集合转数组
        List list = new ArrayList(set);
        int yes = Integer.parseInt(list.get(1).toString());
        return yes;

    }

    public static void main(String[] args) {
        String s = "ck06666677";
        Slution slution = new Slution();
        System.out.println(slution.secondHighSet(s));
    }
}
